let lib_upload_single = require("./lib/upload-single");


/**
 * 
 * @param {String} full_path 
 * @returns {Promise<{result:Boolean,file_url:String,message:String}>}
 */
function uploadSingle(full_path) {
  return new Promise(async resolve => {
    lib_upload_single.uploadSingleForXTime(5, full_path).then(fu => {
      resolve({
        result: true,
        file_url: fu,
        message: "ok"
      })
    }).catch(err => {
      resolve({
        result: false,
        file_url: "",
        message: err
      })
    })

  })

}


module.exports = {
  uploadSingle: uploadSingle
}